package com.dayaokeji.rhythmschoolstudent.utils;

import android.content.Context;
import android.graphics.drawable.Drawable;

import com.dayaokeji.rhythmschoolstudent.R;

/**
 * Created by Gorden on 2017/12/19.
 */

public class BulletinUtil {

    /**
     * 不需要回执
     */
    public static final int NO_NEED_RECEIPT = 1;

    /**
     * 需要回执
     */
    public static final int NEED_RECEIPT = 2;

    /**
     * 未回执
     */
    public static final int NO_RECEIPT = 1;

    /**
     * 已回执
     */
    public static final int ALREADY_RECEIPT = 2;


    public static String getBulletinTypeName(int status) {
        String typeName;
        switch (status) {
            case 1:
                typeName = "课堂";
                break;
            case 2:
                typeName = "会议";
                break;
            case 3:
                typeName = "学校";
                break;
            case 4:
                typeName = "群组";
                break;
            default:
                typeName = "其他";
                break;
        }

        return typeName;
    }

    public static Drawable getBulletinType2Drawable(Context context,int type) {
        Drawable drawable;
        switch (type) {
            case 1:
                drawable = context.getResources().getDrawable(R.mipmap.ic_bulletion_class);
                break;
            case 2:
                drawable = context.getResources().getDrawable(R.mipmap.ic_bulletion_meeting);
                break;
            case 3:
                drawable = context.getResources().getDrawable(R.mipmap.ic_bulletion_school);
                break;
            case 4:
                drawable = context.getResources().getDrawable(R.mipmap.ic_bulletion_group);
                break;
            default:
                drawable = context.getResources().getDrawable(R.mipmap.ic_bulletion_other);
                break;
        }

        return drawable;
    }

}
